All Questions
4 questions
2votes
3answers
199views
Is it still "feature envy" if the state to make decision or the action to take after asking the state involves other classes to participate?
According to https://softwareengineering.stackexchange.com/a/212130/432039, if a class asks another class for the state, and then call methods of that class, it is called "feature envy", eg: ...
6votes
4answers
10kviews
Refactoring many else if, else if, else if, etc. statements
I'm trying to parse readable data from PDFs and I keep ending up writing code like the following: if (IsDob(line)) { dob = ParseDob(line); } else if (IsGender(line)) { gender = ParseGender(...
43votes
12answers
4kviews
Coding style (do more, then simplify) [duplicate]
I'm a CS student and I have been coding for a few months shy of a year now, and I seem to have developed what I think may be a "bad" habit and I'm wondering if anyone does the same (or whether it's a ...
22votes
18answers
4kviews
Why write clean, refactored code? [duplicate]
From my experience of working on several Java based projects, I've seen tons of codes which we call 'dirty'. The unconventional class/method/field naming, wrong way of handling of exceptions, ...